﻿using Microsoft.AspNetCore.Mvc;
using BaseProject.Application.Interfaces;
using BaseProject.Model.ViewModels;

namespace BaseProject.Web.ViewComponents
{
    public class Menu : ViewComponent
    {
        private readonly IWorkContext _workContext;

        public Menu(IWorkContext workContext)
        {
            this._workContext = workContext;
        }

        public IViewComponentResult Invoke()
        {
            var user = this._workContext.CurrentUser;
            //TODO 可以根据权限输出菜单
            var model = new MenuVM();
            return View(model);
        }
    }
}